package strategy;

import java.util.ArrayList;
import java.util.Random;

public class Main {
	public static void main(String[] args) {
		 Soldier s = new Soldier();
		 Cannon c = new Cannon();
		 Tank t = new Tank();
		 ArrayList<IUnit> list = new ArrayList<IUnit>();
		 Random rnd = new Random();
		 for (int i = 0; i < 15; i++) {
			 switch(rnd.nextInt(3))
			 {
			 case 0:
				 list.add(s);
				 break;
			 case 1:
				 list.add(c);
				 break;
			 case 2:
				 list.add(t);
				 break;
			 }
		}
		 
		 for (IUnit iUnit : list) {
			iUnit.Fire();
		}
	}
}
